let url = require('./url');
module.exports=(req,get={})=>{
  //解析get数据,其实get不需要解析
  url(req.url.replace(/.*\?/,"")).split("&").filter(e=>e).forEach(e=>{
    e = e.split("=");
    get[e[0]]=e[1];
    req[e[0]]=e[1];
  })
  get={...(req.$route_parameter?req.$route_parameter:{}),...get}
  req.$all=(key)=>{if(key===undefined){return get}else {return get[key]}}
}